<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
	<title>会员注册</title>
	<link rel="stylesheet" href="css/core.css">
	<script src="js/jquery-2.2.4.min.js" type="text/javascript"></script>
	<script src="js/jquery.cookie.js" type="text/javascript"></script>
	<script src="js/layer/layer.js" type="text/javascript"></script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?cb5d49b07e0a753dc8ee27ba2c73495d";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body style="background:#FFF;">
<section>
	<div class="main">
		<div class="header-box" style="height:50px;">
			<a href="login.html" class="back"><img src="images/back-h.png" /></a>
		</div>
		<div class="register-info-box">
			<h2>注册</h2>
			<div class="register-input-box">
				<i class="icon-phone"></i><input type="text" name="phone" placeholder="手机号注册" />
			</div>
			<div class="register-input-box">
				<i class="icon-sms"></i><input type="text" name="smscode" placeholder="输入验证码" /><button class="sms-btn">获取验证码</button>
			</div>
			<div class="register-input-box">
				<i class="icon-pass"></i><input type="text" name="pass" placeholder="输入您的密码" />
			</div>
			<div class="register-input-box">
				<i class="icon-pass"></i><input type="text" name="conpass" placeholder="再次确认您的密码" />
			</div>
			<div class="register-type-box">
				<label class="cur">普通用户<input type="radio" value="0" /></label>
				<label>个人用户<input type="radio" value="1" /></label>
				<label>企业用户<input type="radio" value="2" /></label>
			</div>
			<button class="reg-btn">同意协议并注册</button>
		</div>
	</div>
</section>
<font class="reg-footer-desc">请仔细阅读《使用协议》&《隐私政策》</font>
<script type="text/javascript">

$(function(){
	$(".reg-btn").click(function(){
		if($("input[name='phone']").val() == ''){
			return layer.open({content:"请输入注册手机号",skin:'msg',time:3});
		}
		if($("input[name='smscode']").val() == ''){
			return layer.open({content:"输入验证码",skin:'msg',time:3});
		}
		if($("input[name='pass']").val() == ''){
			return layer.open({content:"输入您的密码",skin:'msg',time:3});
		}
		if($("input[name='conpass']").val() == ''){
			return layer.open({content:"再次确认您的密码",skin:'msg',time:3});
		}
		if($("input[name='pass']").val() != $("input[name='conpass']").val()){
			return layer.open({content:"密码不一致",skin:'msg',time:3});
		}
		
		layer.open({content:"注册成功",skin:'msg',time:3});
	});
	
	$(".register-type-box label").click(function(){
		$(this).addClass("cur").siblings().removeClass("cur");
	});
	
	$(".sms-btn").click(function(){
		if($("input[name='phone']").val() == ''){
			return layer.open({content:"请输入注册手机号",skin:'msg',time:3});
		}
		layer.open({content:"验证码发送成功",skin:'msg',time:3});
	});
});

</script>
</body>
</html>